<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<html>
	<%
		String path = request.getContextPath();
		String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
	 %>
  <head>
    <meta charset="UTF-8">
    <title>酒店管理系统</title>
    <link href=<%=basePath+"/stylesheets/index.css"%> type="text/css" rel="stylesheet">
    <link rel="icon" href="images/icon.jpg">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        html,body{
            height: 100%;
            margin:0;
            padding: 0;
        }
    </style>
  </head>
  
  <body>
  <%
  		String account = (String)session.getAttribute("account");
  		String msg = (String)session.getAttribute("msg");
  		if(msg!=null&&msg!=""){
  			%>
  					<script type="text/javascript" language="javascript">
  						var msg = '<%=msg%>'
	    				alert(msg);
	    			</script>
  			<%
  		}
  		session.removeAttribute("msg");
   %>
    <div id="leftFrame">
        <div id="headPhotoDiv">
            <img src=<%=basePath+"/images/admin.jpg" %>  id="adminPhotoImg">
            <p id="name">管理员：<%=account %></p>
            <button onclick="window.location.href='http://localhost:8080/HotelSystem/login.jsp'" id="outBtn">退出账号</button>
        </div>
        <div style="text-align: center">
            <ul id="choieFrame">
                <li type="disc">
                    <a href="http://localhost:8080/HotelSystem/realTimeRoom.jsp" target="rightFrame">实时房态</a>
                </li>
                <li>
                    <a href="http://localhost:8080/HotelSystem/registerInHome.jsp" target="rightFrame">入住登记</a>
                </li>
                <li>
                    <a href="http://localhost:8080/HotelSystem/reserveInfo.jsp" target="rightFrame">订单信息</a>
                </li>
                <li>
                    <a href="http://localhost:8080/HotelSystem/clientInfo.jsp" target="rightFrame">客户信息</a>
                </li>
                <li>
                    <a href="http://localhost:8080/HotelSystem/amendInfo.jsp" target="rightFrame">修改信息</a>
                </li>
                <li>
                    <a href="http://localhost:8080/HotelSystem/queryInfo.jsp" target="rightFrame">查询信息</a>
                </li>
                <li>
                    <a href="http://localhost:8080/HotelSystem/staticsInfo.jsp" target="rightFrame">统计信息</a>
                </li>
                <li>
                    <a href="http://localhost:8080/HotelSystem/cancelOrder.jsp" target="rightFrame">退房管理</a>
                </li>
            </ul>
        </div>
    </div>
    <!-- marginwidth距离左右两边的距离，marginheight是距离上下底部的距离 -->
    <iframe id="rightFrame" name="rightFrame" src="http://localhost:8080/System/realTimeRoom.jsp" frameborder="0" marginwidth="0" marginheight="0"></iframe>
  </body>
</html>
